/* -----------------------------------------------------------
 * Author: Marie Caswell
 * Testing Function: whoseTurn()
 * Description: Check for correct whoseTurn() behavior.  
 -----------------------------------------------------------*/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int main() {

	int seed = 1000;
    int numPlayer = 4;
    int i;
    int player[4] = {0,1,2,3}; //initialize array to represent four players
    int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};
    struct gameState G;

    memset(&G, 23, sizeof(struct gameState));   // clear the game state
    initializeGame(numPlayer, k, seed, &G); // initialize a new game

    for (i=0; i<numPlayer; i++)
    {
    	G.whoseTurn = player[i]; //set player turn
    	printf("\ncurrent player: %d", (whoseTurn(&G)+1)); //check player turn by printing whoseTurn()
    	assert(whoseTurn(&G) == player[i]); //check player turn by calling whoseTurn()

    }
    
  //  G.whoseTurn = player1; //set turn to player 1

printf("\n\nTests passed.\n");
return 0;

} 
